<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
  <head>
    <base href="<%=basePath%>">
    
	<%@include file="/jsp/common/jspCommonHeadSetting.jsp"%>
	<%@include file="/jsp/common/adminCommonHeadSetting.jsp"%>
	<script type="text/javascript" src="<c:url value="/js/userInfoValidation.js" />" charset="utf-8"></script>
	<script type="text/javascript" src="<c:url value="/js/admin/adminModifyUserInfoValidation.js" />" charset="utf-8"></script>	
	<title>network</title>
  </head>
  
  <body>
  <div id="wrap">
  	<%@include file="/jsp/common/header.jsp"%>
    <div id="content">
    	<%@include file="/jsp/common/adminLeftContent.jsp"%>
    		<div id="right_content">
				<div class="title">
					修改用户信息
				</div>
			<div id="input_area">
				<div>
					<span class="input_line">用户名：<s:property value="user.userName"></s:property></span>
				</div>
				<s:form action="/admin/modifyPassword.action" namespace="/" onsubmit="return checkModifyPwd();">
					<s:hidden name="user.userName"></s:hidden>
					<div>
						<span class="input_line"><s:password id="pwd" label="密码" name="password"></s:password></span>
					</div>
					<div>
						<span class="input_line"><s:password id="pwdconfirm" label="确认密码" name="pwdconfirm"></s:password></span>
					</div>
					<div>
						<span class="input_line"><s:submit name="submit" value="修改密码"></s:submit>
						</span>
					</div>
				</s:form>
				<s:form action="/admin/modifyUserInfo.action" namespace="/" onsubmit="return checkModifyUserInfo();">
					<s:hidden name="user.userName"></s:hidden>
					<s:hidden name="user.password"></s:hidden>
					<div>
						<span class="input_line"><s:textfield id="name" label="姓名" name="user.name"></s:textfield></span>
					</div>
					<div>
						<span class="input_line"><s:textfield id="school" label="学校" name="user.school"></s:textfield></span>
					</div>
					<div>
						<span class="input_line"><s:textfield id="college" label="学院" name="user.college"></s:textfield></span>
					</div>
					<div>
						<span class="input_line"><s:textfield id="email" label="Email" name="user.email"></s:textfield></span>
					</div>
					<div>
						<span class="input_line">
						<s:select label="类型" name="user.role" list="#{'A':'管理员','U':'用户'}"
						listKey="key" listValue="value"/>
						</span>
					</div>
					<div>
						<span class="input_line"><s:submit name="submit" value="更新信息"></s:submit>
						</span>
					</div>
				</s:form>
			</div>
		</div>
    </div>
  </div>
  </body>
</html>